********************************************************************************
* Purpose: Prepares labor market outcomes for mothers in sample only
* preparation for next DREAM do file
********************************************************************************

do "D:\Data\workdata\708296\Project - Mother groups and mental health\Do\global.do" 

* transfers
use pnr y_1201-y_2052 using "$raw\DREAM202012",clear

rename pnr id_mother
merge 1:m id_mother using "$work\mothers1", keep(3) nogen 
save "$work\dreammothers", replace

use pnr y_1201-y_2052 using "$raw\DREAM202012",clear

rename pnr id_father
merge 1:m id_father using "$work\fathers1", keep(3) nogen
save "$work\dreamfathers", replace

*Employment
use pnr branche* using "$raw\DREAM202012",clear

preserve
rename pnr id_mother
merge 1:m id_mother using "$work\mothers1", keep(3) nogen
save "$work\dreammothers_branche", replace
restore

rename pnr id_father
merge 1:m id_father using "$work\fathers1", keep(3) nogen
save "$work\dreamfathers_branche", replace